Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Getting Information About Compressor Components


FindCodec

The FindCodec function allows you to determine which of the installed compressors or decompressors has been chosen to field requests made using one of the special compressor identifiers.

Some Image Compression Manager functions allow you to specify a particular compressor component. For example, you may use the codec parameter to
the CompressSequenceBegin function (described on page 3-110) to specify a particular compressor to do the compression.

You identify the compressor to the Image Compression Manager by specifying the compressor's component identifier (see the description of the GetCodecNameList function on page 3-57 for information on retrieving these identifiers).

The Image Compression Manager also supports several special identifiers that allow you to exert some control over the component for a given action without having to know its identifier.

pascal OSErr FindCodec (CodecType cType, CodecComponent specCodec,
                        CompressorComponent *compressor,
                        DecompressorComponent *decompressor);
cType
Specifies a compressor type. You must set this parameter to a
valid compressor type (see Table 3-3 on page 3-59 for a list of the available compressor types).
specCodec
Contains a special identifier value. You must set this parameter to one of the following special identifier values:
anyCodec
Choose the first compressor or decompressor of the specified type
bestSpeedCodec
Choose the fastest compressor or decompressor of the specified type
bestFidelityCodec
Choose the most accurate compressor or decompressor of the specified type
bestCompressionCodec
Choose the compressor that produces the smallest resulting data
compressor
Contains a pointer to a field to receive the identifier for the compressor component. The Image Compression Manager returns the identifier of the compressor that meets the special characteristics you specify in the specCodec parameter. Note that this identifier may differ from the value of the field referred to by the decompressor field. The Image Compression Manager sets this field to 0 if it cannot find a
suitable compressor component. Set this parameter to nil if you do not want this information.
decompressor
Contains a pointer to a field to receive the identifier for the decompressor component. The Image Compression Manager returns the identifier of the decompressor that meets the special characteristics you specify in the specCodec parameter. Note that this identifier may differ from the value of the field referred to by the compressor field. The Image Compression Manager sets this field to 0 if it cannot find a suitable decompressor component. Set this parameter to nil if you do not want this information.
DESCRIPTION
You can use the FindCodec function to obtain the identifier of the component that is being used to field requests made with one of the special compressor identifiers.

RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
memFullErr-108Not enough memory available
noCodecErr-8961The Image Compression Manager could not find the specified compressor

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996